import {
    get,
    post,
    put,
    deletes
} from '../utils/http'

//参考范例,必须传递对象
export const getAllUser = (pageSize) => {
        pageSize = pageSize || 1;
        return get('/users', {
            page_num: pageSize
        })
    }
    //=======网游棋牌=================

export const login = (user) => {
    return post('/login', user);

}

export const getAgents = () => {
    return get('/getAgents')
}
export const addOneAgent = (agent) => {
    var params = {
        username: agent.username,
        password: agent.password,
        status: agent.status,
        tel: agent.tel
    };
    return post('/addAgent', params)
}

export const editAgent = (params) => {
    return post('/editAgent', params)
}
export const searchAgentById = (agentId) => {
    var key = agentId.replace(/\s/g, "")
    console.log(key);
    return get("/agent/" + agentId)
}

export const searchPlayer = (uid) => {
    return get('/player/' + uid)
}

//=======网游棋牌=================
export const addRoomCardForPlayer = (params) => {
        return post('/addRoomCard', params)
    }
    //给代理冲卡
export const addRoomCardForAgent = (params) => {
    return post('/addRoomCardForAgent', params)
}
export const getAddCardRecord = (managerId) => {
    return get('/agentRecord/' + managerId)
};
//获取大厅信息
export const getHallInfo = () => {
    return post('/hallInfo')
};
//修改大厅信息
export const modifyHallInfo = (params) => {
        console.log('params========>')
        console.log(params)
        return post('/modifyhallInfo', params)
    };
//获取大厅信息
export const getFeedBacks = () => {
    return post('/getFeedBacks')
};
export const modifyHouse = (params) => {
    return post('/modifyHouse',params)
};